package com.camera.yl.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.camera.yl.bean.TabBean

class MainPagerAdapter(activity: FragmentActivity, private val list: List<TabBean>) : FragmentStateAdapter(activity) {

    override fun getItemCount(): Int = list.size

    override fun createFragment(position: Int): Fragment {
        return list.get(position).fragment;
    }
} 